package com.shiqi.bio.transmissionFile;

import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author shiqi
 * @version 1.0.0
 * @ClassName Server.java
 * @Description
 * @createTime 2022-05-16
 */
public class Server {
    public static void main(String[] args) {
        try{
            ServerSocket ss = new ServerSocket(8888);
            while (true){
                Socket socket = ss.accept();
                // 交给一个独立的线程来处理与这个客户端的文件通信需求。
                new ServerReaderThread(socket).start();
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
